/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.Tag;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * Run
 */
@JsonPropertyOrder({
  Run.JSON_PROPERTY_RUN_ID,
  Run.JSON_PROPERTY_NAME,
  Run.JSON_PROPERTY_SOURCE,
  Run.JSON_PROPERTY_CHROMATOGRAPHY,
  Run.JSON_PROPERTY_IONIZATION,
  Run.JSON_PROPERTY_FRAGMENTATION,
  Run.JSON_PROPERTY_MASS_ANALYZERS,
  Run.JSON_PROPERTY_TAGS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class Run {
  public static final String JSON_PROPERTY_RUN_ID = "runId";
  @jakarta.annotation.Nullable
  private String runId;

  public static final String JSON_PROPERTY_NAME = "name";
  @jakarta.annotation.Nullable
  private String name;

  public static final String JSON_PROPERTY_SOURCE = "source";
  @jakarta.annotation.Nullable
  private String source;

  public static final String JSON_PROPERTY_CHROMATOGRAPHY = "chromatography";
  @jakarta.annotation.Nullable
  private String chromatography;

  public static final String JSON_PROPERTY_IONIZATION = "ionization";
  @jakarta.annotation.Nullable
  private String ionization;

  public static final String JSON_PROPERTY_FRAGMENTATION = "fragmentation";
  @jakarta.annotation.Nullable
  private String fragmentation;

  public static final String JSON_PROPERTY_MASS_ANALYZERS = "massAnalyzers";
  @jakarta.annotation.Nullable
  private List<String> massAnalyzers;

  public static final String JSON_PROPERTY_TAGS = "tags";
  @jakarta.annotation.Nullable
  private Map<String, Tag> tags;

  public Run() {
  }

  public Run runId(@jakarta.annotation.Nullable String runId) {
    
    this.runId = runId;
    return this;
  }

  /**
   * Identifier
   * @return runId
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RUN_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getRunId() {
    return runId;
  }


  @JsonProperty(JSON_PROPERTY_RUN_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRunId(@jakarta.annotation.Nullable String runId) {
    this.runId = runId;
  }

  public Run name(@jakarta.annotation.Nullable String name) {
    
    this.name = name;
    return this;
  }

  /**
   * Informative, human-readable name of this run
   * @return name
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }


  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setName(@jakarta.annotation.Nullable String name) {
    this.name = name;
  }

  public Run source(@jakarta.annotation.Nullable String source) {
    
    this.source = source;
    return this;
  }

  /**
   * Source location
   * @return source
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSource() {
    return source;
  }


  @JsonProperty(JSON_PROPERTY_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSource(@jakarta.annotation.Nullable String source) {
    this.source = source;
  }

  public Run chromatography(@jakarta.annotation.Nullable String chromatography) {
    
    this.chromatography = chromatography;
    return this;
  }

  /**
   * Get chromatography
   * @return chromatography
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CHROMATOGRAPHY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getChromatography() {
    return chromatography;
  }


  @JsonProperty(JSON_PROPERTY_CHROMATOGRAPHY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setChromatography(@jakarta.annotation.Nullable String chromatography) {
    this.chromatography = chromatography;
  }

  public Run ionization(@jakarta.annotation.Nullable String ionization) {
    
    this.ionization = ionization;
    return this;
  }

  /**
   * Get ionization
   * @return ionization
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_IONIZATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getIonization() {
    return ionization;
  }


  @JsonProperty(JSON_PROPERTY_IONIZATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIonization(@jakarta.annotation.Nullable String ionization) {
    this.ionization = ionization;
  }

  public Run fragmentation(@jakarta.annotation.Nullable String fragmentation) {
    
    this.fragmentation = fragmentation;
    return this;
  }

  /**
   * Get fragmentation
   * @return fragmentation
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_FRAGMENTATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getFragmentation() {
    return fragmentation;
  }


  @JsonProperty(JSON_PROPERTY_FRAGMENTATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFragmentation(@jakarta.annotation.Nullable String fragmentation) {
    this.fragmentation = fragmentation;
  }

  public Run massAnalyzers(@jakarta.annotation.Nullable List<String> massAnalyzers) {
    
    this.massAnalyzers = massAnalyzers;
    return this;
  }

  public Run addMassAnalyzersItem(String massAnalyzersItem) {
    if (this.massAnalyzers == null) {
      this.massAnalyzers = new ArrayList<>();
    }
    this.massAnalyzers.add(massAnalyzersItem);
    return this;
  }

  /**
   * Get massAnalyzers
   * @return massAnalyzers
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MASS_ANALYZERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getMassAnalyzers() {
    return massAnalyzers;
  }


  @JsonProperty(JSON_PROPERTY_MASS_ANALYZERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMassAnalyzers(@jakarta.annotation.Nullable List<String> massAnalyzers) {
    this.massAnalyzers = massAnalyzers;
  }

  public Run tags(@jakarta.annotation.Nullable Map<String, Tag> tags) {
    
    this.tags = tags;
    return this;
  }

  public Run putTagsItem(String key, Tag tagsItem) {
    if (this.tags == null) {
      this.tags = new HashMap<>();
    }
    this.tags.put(key, tagsItem);
    return this;
  }

  /**
   * Key: tagName, value: tag
   * @return tags
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Map<String, Tag> getTags() {
    return tags;
  }


  @JsonProperty(JSON_PROPERTY_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTags(@jakarta.annotation.Nullable Map<String, Tag> tags) {
    this.tags = tags;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Run run = (Run) o;
    return Objects.equals(this.runId, run.runId) &&
        Objects.equals(this.name, run.name) &&
        Objects.equals(this.source, run.source) &&
        Objects.equals(this.chromatography, run.chromatography) &&
        Objects.equals(this.ionization, run.ionization) &&
        Objects.equals(this.fragmentation, run.fragmentation) &&
        Objects.equals(this.massAnalyzers, run.massAnalyzers) &&
        Objects.equals(this.tags, run.tags);
  }

  @Override
  public int hashCode() {
    return Objects.hash(runId, name, source, chromatography, ionization, fragmentation, massAnalyzers, tags);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Run {\n");
    sb.append("    runId: ").append(toIndentedString(runId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    source: ").append(toIndentedString(source)).append("\n");
    sb.append("    chromatography: ").append(toIndentedString(chromatography)).append("\n");
    sb.append("    ionization: ").append(toIndentedString(ionization)).append("\n");
    sb.append("    fragmentation: ").append(toIndentedString(fragmentation)).append("\n");
    sb.append("    massAnalyzers: ").append(toIndentedString(massAnalyzers)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

